home *** CD-ROM | disk | FTP | other *** search
- Path: nntphub.cb.att.com!news
- From: "Andrew M. Shaw" <shaw@lydian.lc.att.com>
- Newsgroups: comp.lang.c++
- Subject: MS VC++ 4.0 namespace weirdness
- Date: Mon, 18 Mar 1996 12:32:54 -0500
- Organization: Lucent Technologies Bell Labs
- Message-ID: <314D9E46.433@lydian.lc.att.com>
- NNTP-Posting-Host: andrew.lc.att.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (WinNT; I)
-
- [Hope this is the right group -- didn't see a VC++-specific one]
-
- If I define a namespace in an include file, the classes within
- that
- namespace are not recognized by the MS VC++ 4.0 class window.
- If I
- define the namespace in the including file, they are. Any
- opinions
- on this anomaly?
-
- Thanks,
- andrew.shaw@att.com
-
- Example:
-
- // foo1.hpp
- namespace FOO1
- {
- class X1 { int x1; };
- }
-
- // foo2.hpp
- class X2 { int x2; };
-
- // foo.cpp
- #include "foo1.hpp" // whereis FOO1::X1?
- namespace FOO2
- {
- #include "foo2.hpp" // FOO2::X2 no problem
- }
-